$(function(){
    initWidth()
    $(window).resize(initWidth);
});

function initWidth(){
    var searchs = $(".txte");
    var widths = [];
    searchs.each(function(){
        var $search = $(this);
        var width = 0;
        $search.find(">*>*").each(function(){
            var $this = $(this);
            width+=$this.width()+parseInt($this.css("padding-left"))+parseInt($this.css("padding-right"))+parseInt($this.css("margin-right"))+parseInt($this.css("margin-right"));
        });
        widths.push(width+(window.initWidthValue?window.initWidthValue:100));
    });
    var settingWidth = 0;
    //var tableWidth = $(".scrollTable").width();
    if(widths.length>0){
        widths.sort();
        widths.reverse();
        if(widths[0]<$(window).width()){
            $("body").width($(window).width());
            return false;
        }
        //if(widths[0]<tableWidth){
        //    settingWidth = tableWidth+100;
        //}else{
        //    settingWidth = tableWidth;
        //}
        $("body").width(widths[0]);
    }
}